package com.atguigu.gmall.feign.seckill;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.activity.SeckillGoods;
import com.atguigu.gmall.model.order.OrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/9/18 1:22
 */
@FeignClient("service-seckill")
@RequestMapping("/rpc/inner/seckill")
public interface SeckillFeign {

    @GetMapping("/seckillList")
    Result<List<SeckillGoods>> seckillList();

    @GetMapping("/seckillDetail")
    Result<SeckillGoods> seckillDetail(@RequestParam("skuId") Long skuId);

    @GetMapping("/orderDetails/{skuId}")
    Result<OrderInfo> orderDetails(@RequestParam("skuId") Long skuId);
}
